﻿function Message(data) {
    this.Id = ko.observable(data.Id ? data.Id : 0);
    this.Created = ko.observable(data.Created ? data.Created : "");
    this.Updated = ko.observable(data.Updated ? data.Updated : "");
    this.Subject = ko.observable(data.Subject ? data.Subject : "");
    this.Body = ko.observable(data.Body ? data.Body : "");
    this.IsChecked = ko.observable(data.IsChecked ? data.IsChecked : false);
    this.ParentId = ko.observable(data.ParentId ? data.ParentId : 0);
    this.MessageExpertUsers = ko.observableArray(data.MessageExpertUsers ? data.MessageExpertUsers : []);
    this.MessageCompanyUsers = ko.observableArray(data.MessageCompanyUsers ? data.MessageCompanyUsers : []);
    this.MessageProjectUsers = ko.observableArray(data.MessageProjectUsers ? data.MessageProjectUsers : []);
}